home *** CD-ROM | disk | FTP | other *** search
/ Acorn Risc Technologies StrongARM CD-ROM / Acorn Risc Technologies StrongARM CD-ROM.iso / ftp / documents / appnotes / 200_215 / 205c / Text
Encoding:
Text File  |  1993-08-02  |  12.0 KB  |  276 lines

  1. 9th July 1992
  2. -----------------------------------------------------------------------------
  3. Support Group Application Note 
  4. Number: 205
  5. Issue: 1 
  6. Author: James Bye
  7. -----------------------------------------------------------------------------
  8.  
  9. Writing applications for the Acorn A4
  10.  
  11. -----------------------------------------------------------------------------
  12. Applicable Hardware: Acorn A4
  13.  
  14. Related Application Notes:
  15.  
  16.  
  17. -----------------------------------------------------------------------------
  18. Copyright (C) Acorn Computers Limited 1992
  19.  
  20. Every effort has been made to ensure that the information in this leaflet is 
  21. true and correct at the time of printing. However, the products described in
  22. this leaflet are subject to continuous development and improvements and
  23. Acorn Computers Limited reserves the right to change its specifications at
  24. any time. Acorn Computers Limited cannot accept liability for any loss or
  25. damage arising from the use of any information or particulars in this
  26. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  27. Limited.
  28. -----------------------------------------------------------------------------
  29. Support Group
  30. Acorn Computers Limited
  31. Acorn House
  32. Vision Park
  33. Histon
  34. Cambridge       CB4 4AE
  35. -----------------------------------------------------------------------------
  36.  
  37.  
  38. This application note outlines what the application author needs to take
  39. into account when writing applications for the Acorn A4 computer.
  40.  
  41.  
  42. 1. Introduction
  43.  
  44. The Acorn A4 computer is the first RISC OS portable computer to be produced
  45. by Acorn.  It is essentially an A5000 in a smaller portable box. Being a
  46. portable computer, the Acorn A4 has significant differences in hardware
  47. compared with other systems that Acorn have produced, with the differences
  48. being associated with portability.
  49.  
  50. This document outlines some of the differences and points out certain
  51. aspects that application authors should consider when developing software
  52. for use on the hardware platform.
  53.  
  54.  
  55.  
  56. 2. Machine user interface
  57.  
  58. The Acorn A4 computer has a different user interface, regarding the screen
  59. and the keyboard, to other machines that have been produced.
  60.  
  61. 2.1  Screen Display
  62.  
  63. The screen display for the Acorn A4 is an edgelit LCD (Liquid Crystal
  64. Display), 182mm × 137mm viewing area, with a fixed dot pitch of 0.27mm².  It
  65. is a negative display (white dots on a black background), and it provides a
  66. 15 grey scale palette and a resolution of 640×480 dots at a frame rate of
  67. approximately 85Hz.  The default  – and the only intended  –  mode for the
  68. display is Mode 27 which is a 16 'colour' VGA mode, although other RISC OS
  69. display modes are emulated in letter box formats and/or by pixel doubling. 
  70. The screen itself has the same 4:3 aspect ratio as a standard VGA monitor. 
  71. The colour to greyscale translation is based on luminance, in accordance
  72. with a 4G + 2R + 1B rule.  The exact mapping from the derived luminance
  73. level to the 15 grey scales is still being refined.
  74.  
  75. Note that LCD displays are relatively 'slow' i.e. they have a considerable
  76. persistence which causes the display to appear smeared if objects are
  77. dragged rapidly or animated.  This persistence increases at lower
  78. temperatures.
  79.  
  80. A 15pin VGA D-type connector is provided for connection to an external
  81. monitor, although only one of the monitor or the LCD can be active at any
  82. one time.
  83.  
  84.  
  85. 2.2  Keyboard
  86.  
  87. The keyboard in the portable has some differences that the application
  88. author will need to take into account.  The keyboard has [only] 83 keys; a
  89. numeric keypad is embedded and there are only ten physical function keys.
  90. The functionality of F11 and F12 and the numeric keypad are accessible via
  91. an additional special shifting key (FN).  The logical layout is exactly as a
  92. UK PC, i.e. not identical with the Acorn Archimedes [US] layout and the PC
  93. Emulator, for example, requires a 'KEYB UK' or equivalent command at an
  94. appropriate point in its start-up.
  95.  
  96.  
  97. With the implementation of the FN key, the use of keyboard short cuts can
  98. become more complicated.  On a standard RISC OS 3 machine, the following key
  99. sequence causes the machine to shutdown:-
  100.  
  101.         shutdown = Ctrl + Shift + F12
  102.  
  103. On the portable, the shutdown sequence needs an extra key as follows:-
  104.  
  105.         shutdown = Ctrl + Shift + FN + F2
  106.  
  107. The application author needs to check that the keyboard short-cuts
  108. implemented are not too tortuous for the average user to employ.  Special
  109. attention needs to be made by authors who are aiming their software at the
  110. special needs market.
  111.  
  112. Developers should not make use of the 'FN' key for keyboard shortcuts in
  113. their own software.  However, if you are developing portable specific
  114. software and wish to make use of the 'FN' key then you should contact
  115. developer support detailing which keyboard combinations you wish to use. 
  116. This will prevent confusion if Acorn wish to assign 'FN' key combinations in
  117. the future.
  118.  
  119. A connector is provided for the connection of an external PC/AT keyboard
  120. with a 6 pin miniDIN connector.  External Archimedes keyboards are not
  121. supported.
  122.  
  123. 2.3  Mouse
  124.  
  125. A standard Acorn mouse is supplied with the Acorn A4. The mouse plugs into
  126. the main unit via a 9 pin miniDIN plug, the same connector as that of an
  127. Archimedes.  However, although unsurpassed as a pointing device, operation
  128. of the mouse when away from a suitable flat surface may not always be
  129. convenient.  Hence, it is important that applications software has adequate
  130. keyboard short-cuts to enable the user to drive the majority of common tasks
  131. from the keyboard.  The portable does have the ability to 'emulate' the
  132. mouse from the keyboard using the FN key and the cursor keys, although this
  133. does require a little practise and is not a total substitute for a mouse. 
  134. All keyboard short-cuts should follow the rules laid out in the RISC OS
  135. Style Guide.
  136.  
  137.  
  138. 2.4  Sound
  139.  
  140. The Acorn A4 has a very small internal mono speaker.  The actual sound
  141. produced by this speaker is quieter and of subjectively lower quality than
  142. an Archimedes speaker.  A 3.5mm stereo jack socket (32W) allows personal
  143. headphones or other amplification equipment to be connected directly.  The
  144. sound quality via the jack socket is at least as good as that produced by
  145. standard Archimedes computers.
  146.  
  147.  
  148. 3. Programmers interface
  149.  
  150. The actual programmer's interface has not changed for the portable.  RISC OS
  151. 3 Version 3.10 is provided as the operating system and all interfaces are
  152. still supported.   However, certain rules need to be followed to ensure that
  153. the software runs as effectively on the Acorn A4 as on any other RISC OS
  154. platform.
  155.  
  156. 3.1  Colours
  157.  
  158. As the Acorn A4 displays 'only' in one mode and in 15 greyscales it is
  159. important that the application author produces mode independent software. 
  160. The generation of software that relies on running in mode 12 with 16 true
  161. colours is not likely to be accepted by users and may not run in an
  162. effective way on the portable machine.  The rendering of sprites for filer
  163. viewers and iconbar  sprites will have their colours automatically
  164. translated by the Window Manager.  However, the application author should
  165. always use ColourTrans when dealing with colours (i.e. when rendering
  166. sprites in windows the programmer should call ColourTrans_SelectTable for
  167. mode- independent sprite rendering).
  168.  
  169. Application developers should always supply a !Sprites22 with their
  170. application.  The high resolution sprites look better in grey-scale.
  171.  
  172.  
  173. 4.  Battery
  174.  
  175. The Acorn A4 is powered by a Nickel Cadmium Battery that has an average
  176. useful life of approximately 3 hours from fully charged.  The portable is
  177. supplied with a mains power supply / charger unit that connects via a 9 pin
  178. D-type connector at the back of the machine.  When the portable is connected
  179. to the PSU during normal operation, the battery is automatically charged
  180. whether the machine is in use or not.
  181.  
  182. An interface is provided to the user/programmer by an application called the
  183. Battery Manager.  The Battery Manager will provide constant feedback of
  184. battery power remaining to the user via an icon. This will be a sliding bar
  185. whose indicated level will indicate the proportion of nominal full capacity
  186. that remains in the battery.
  187.  
  188.  
  189. 4.1  Running out of power sequence: inside the desktop
  190.  
  191. The application author needs to understand what series of events will occur
  192. when the battery level has run down to a level that will require a
  193. re-charge.  This series of events consists of three different thresholds
  194. (T1, T2 and T3) which are as follows :-
  195.  
  196. At point T1 (as defined above), the Battery Manager will flash the screen
  197. repeatedly, accompanying each flash with two short beeps to indicate that
  198. the battery is nearly discharged and the Battery Manager will display an
  199. error box indicating this. When the user next presses a key, this flashing
  200. will stop and the machine will return to normal use and the user will have
  201. to acknowledge the error box. The user will be expected at this stage to
  202. complete whatever he is doing and shut the machine down.
  203.  
  204.  
  205.  
  206. At point T2, the Battery Manager will attempt to shut down the machine. 
  207. This will cause each application that is aware of the auto-shutdown
  208. mechanism to save its data to a safe place (at the moment, the safe place is
  209. defined as '<Wimp$ScrapDir>.AppName.data').
  210.  
  211. Applications that are not aware of the auto-shutdown mechanism will still be
  212. shut down and any unsaved data will be lost. At the end of a T2 forced
  213. shutdown, a CMOS flag will be set.  On the next occasion the Wimp is
  214. activated, it will detect this flag and issue a warning box "the last
  215. shutdown was a forced shutdown", and clear the CMOS flag. This will remind
  216. the user to retrieve data which may have been auto-stored by a knowledgeable
  217. application in some default or particular place.  If the application wishes
  218. to be 'clever' it may try and re-load any data that was saved due to a low
  219. power forced shutdown.
  220.  
  221. When the auto-shutdown has completed, the Battery Manager will tell the BMU
  222. to switch off the computer, so preventing the user from resuming activity
  223. when there is insufficient battery charge remaining to support it.
  224.  
  225. It is intended that point T3 will never be reached as the Battery Manager
  226. should have commanded the BMU to remove the power before then. It may,
  227. however, be reached under exceptional circumstances: e.g. machine crash.  At
  228. point T3 the Battery Manager Unit will immediately assert the reset line and
  229. then remove all power.  If the machine does reach this stage there is
  230. nothing that the application can do.
  231.  
  232.  
  233. 4.2  Running out of power: outside the desktop 
  234.  
  235. At point T1, the Battery Manager will flash the screen and generate a double
  236. bleep accompanying each flash (even if the speaker is disabled).  The
  237. flashing will stop once the user presses a key. This action is the same as
  238. the desktop action, except the user won't be given an error box.
  239.  
  240. At point T2, the Battery Manager will *ShutDown the machine and command the
  241. BMU to remove the power.
  242.  
  243.  
  244. 4.3  Auto-shutdown mechanism
  245.  
  246. It will be of considerable benefit to the user of the application if it is
  247. aware of the auto-shutdown mechanism.  This enables the application to save
  248. its data in a safe place if the machine runs out of power unattended, and
  249. should prevent the user from losing his data.
  250.  
  251. The auto-shutdown mechanism is a broadcast message that is sent by the task
  252. manager.  The message is as follows:-
  253.  
  254.         Message_Shutdown  14
  255.         Data field:   None
  256.  
  257. This message will enable applications which know about it to perform some
  258. pre-determined action such as saving any modified data in a known place.
  259.  
  260.  
  261.  
  262. When this message is broadcast, the Task Manager will claim the UpCall
  263. 'Media Search' and if any discs need to be changed (i.e. to save data in a
  264. safe place) an error 'disc not found' will be returned.  In this instance,
  265. the application should not display the error message.  The shutdown save
  266. should be automatic and require no user intervention.
  267.  
  268.  
  269. 5.  Machine expansion
  270.  
  271. The Acorn A4 has a limited expansion capability. The base model is a single
  272. floppy disc 2MByte RAM system, up-gradable to 4MByte and an internal hard
  273. disc.  The high-end model has 4MByte RAM and an internal 60 MByte hard disc. 
  274. Econet networking is provided by an optional module that is internally
  275. fitted.  There is no backplane or internal expansion bus available for
  276. expansion cards.